const cheerio = require('cheerio');
const https = require('https')
let url = 'https://www.bilibili.com';
let req = https.request(url, (res) => {

    let html;
    console.log(res)
    let chunks = []

    res.on('data', chunk => chunks.push(chunk))

    res.on('end', () => {
        html = Buffer.concat(chunks).toString('utf-8')
    })
    const $ = cheerio.load(html)

})



req.end()